<!-- BEGIN PAGE HEADER-->
<h3 class="page-title">
    管理员列表
    <small></small>
</h3>
<div class="page-bar">
    <ul class="page-breadcrumb">
        <li>
            <i class="fa fa-home"></i>
            <a href="index.html">Home</a>
            <i class="fa fa-angle-right"></i>
        </li>
        <li>
            <a href="#">后台管理</a>
            <i class="fa fa-angle-right"></i>
        </li>
        <li>
            <a href="#">管理员列表</a>
        </li>
    </ul>
</div>
<!-- END PAGE HEADER-->
<!-- BEGIN PAGE CONTENT-->
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN EXAMPLE TABLE PORTLET-->
        <div class="portlet box grey-cascade">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-globe"></i>管理员列表
                </div>
                <div class="tools">
                    <a href="javascript:;" class="collapse">
                    </a>
                    <a href="javascript:;" class="reload">
                    </a>
                    <a href="javascript:;" class="remove">
                    </a>
                </div>
            </div>
            <div class="portlet-body">
                <div class="table-toolbar">
                    <div class="row">
                        <!--有添加数据的时候使用-->
                        <!--div class="col-md-6">
                            <div class="btn-group">
                                <button id="sample_editable_1_new" class="btn green" onclick="window.location.href='/admin/member/add'">
                                    Add New <i class="fa fa-plus"></i>
                                </button>
                            </div>
                        </div-->
                    </div>
                </div>
                <table class="table table-striped table-bordered table-hover" id="sample_1">
                    <thead>
                    <tr>
                        <th class="table-checkbox">
                            <input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes"/>
                        </th>
                        <th>
                            ID
                        </th>
                        <th>
                            账号
                        </th>
                        <th>
                            昵称
                        </th>
                        <th>
                            上次登录时间
                        </th>
                        <th>
                            上次登录IP
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach($lists as $value) { ?>
                        <tr class="odd gradeX">
                            <td>
                                <input type="checkbox" class="checkboxes" value="<?php echo $value->getId(); ?>"/>
                            </td>
                            <td>
                                <?php echo $value->getId(); ?>
                            </td>
                            <td>
                                <?php echo $value->getUsername(); ?>
                            </td>
                            <td>
                                <?php echo $value->getNickname(); ?>
                            </td>
                            <td>
                                <?php echo date('Y-m-d H:i:s', $value->getLast_login_time() ); ?>
                            </td>
                            <td>
                                <?php echo long2ip($value->getLast_login_ip()); ?>
                            </td>
                            <td>
                                <?php if($value->getStatus()==1) { ?>
                                    <span class="label label-sm label-success">禁止登录</span>
                                <?php } elseif($value->getStatus()==2) { ?>
                                    <span class="label label-sm label-danger">恢复登录</span>
                                <?php } ?>
                            </td>
                        </tr>
                    <?php } ?>
                    </tbody>
                </table>
                <?php
                $data = [
                    'count'   => $this->count,
                    'page'    => $this->page,
                    'perPage' => $this->perPage,
                ];
                echo $this->render('../../../views/layouts/pager.phtml', $data);
                ?>
            </div>
        </div>
        <!-- END EXAMPLE TABLE PORTLET-->
    </div>
</div>
<!-- END PAGE CONTENT-->